﻿using Utils.Wpf;

namespace PluginSample2
{
	internal class CustomDataParametersVM : ViewModelBase
	{
		#region Properties

		public CustomDataParametersData Data { get; private set; }

		public bool GenerateDailyChart
		{
			get
			{
				return this.Data.GenerateDailyChart;
			}
			set
			{
				if (this.Data.GenerateDailyChart != value)
				{
					this.Data.GenerateDailyChart = value;
					base.OnPropertyChanged("GenerateDailyChart");
				}
			}
		}

		public bool ChartsOnlyOnOperatedDays
		{
			get
			{
				return this.Data.ChartsOnlyOnOperatedDays;
			}
			set
			{
				if (this.Data.ChartsOnlyOnOperatedDays != value)
				{
					this.Data.ChartsOnlyOnOperatedDays = value;
					base.OnPropertyChanged("ChartsOnlyOnOperatedDays");
				}
			}
		}

		public bool ShowOperations
		{
			get
			{
				return this.Data.ShowOperations;
			}
			set
			{
				if (this.Data.ShowOperations != value)
				{
					this.Data.ShowOperations = value;
					base.OnPropertyChanged("ShowOperations");
				}
			}
		}

		public bool ExecuteInParallel
		{
			get
			{
				return this.Data.ExecuteInParallel;
			}
			set
			{
				if (this.Data.ExecuteInParallel != value)
				{
					this.Data.ExecuteInParallel = value;
					base.OnPropertyChanged("ExecuteInParallel");
				}
			}
		}

		#endregion

		#region Public Methods

		public CustomDataParametersVM()
		{
			this.Data = new CustomDataParametersData();
			this.Data.PropertyChanged += Data_PropertyChanged; // Local object
		}

		#endregion

		#region Event Handlers

		private void Data_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
		{
			base.OnPropertyChanged(e.PropertyName);
		}

		#endregion
	}
}
